import React, { Component } from 'react'
import qs from 'query-string'
export default class MessageContent extends Component {
  render() {
    const contentData = [
      { id: '01', content: '我爱你中国' },
      { id: '02', content: '我爱周一帆' },
      { id: '03', content: '夏艺兮' }
    ]

    const { id, title } = this.props.location.state || {}
    const result = contentData.find(item => {
      return item.id === id
    }) || {}
    return (
      <ul>
        <li>ID:{id}</li>
        <li>TITLE:{title}</li>
        <li>CONTNENT:{result.content}</li>
      </ul>
    )
  }
}
